<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>文章列表--layui后台管理模板 2.0</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
		<link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
		<link rel="stylesheet" href="../../css/public.css" media="all" />
	</head>

	<body class="childrenBody">
		<form id="form0" action="http://127.0.0.1:88/index.php/shop/shop/checkShop" class="layui-form" style="width:80%;">
			<div class="layui-form-item layui-row layui-col-xs12">
				<label class="layui-form-label">店铺名称</label>
				<div class="layui-input-block">
					<input type="text" name="shop_name" class="layui-input layui-disabled shop_name" disabled="disabled" readonly lay-verify="required" placeholder="请输入店铺名称">
				</div>
			</div>
			<div class="layui-form-item layui-row layui-col-xs12">
				<label class="layui-form-label">是否通过</label>
				<div class="layui-input-block shop_check">
					<input id="user_name" type="hidden" name="user_name" />
					<input type="radio" name="shop_check" value="yes" title="通过" checked>
					<input type="radio" name="shop_check" value="no" title="不通过">
				</div>
			</div>
			<div class="layui-form-item layui-row layui-col-xs12">
				<label class="layui-form-label">审核说明</label>
				<div class="layui-input-block">
					<textarea class="layui-textarea check_desc" id="check_desc" name="check_desc"></textarea>
				</div>
			</div>
			<div class="layui-form-item layui-row layui-col-xs12">
				<div class="layui-input-block">
					<button id="check" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="check">提交</button>
					<button type="reset" class="layui-btn layui-btn-sm layui-btn-primary">取消</button>
				</div>
			</div>
		</form>
		<script type="text/javascript" src="../../layui/layui.js"></script>
		<script src="../../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			layui.use(['form', 'layer', 'laydate', 'table', 'laytpl'], function() {
				var form = layui.form,
					layer = parent.layer === undefined ? layui.layer : top.layer,
					$ = layui.jquery,
					laydate = layui.laydate,
					laytpl = layui.laytpl,
					table = layui.table,
					laypage = layui.laypage;
					$("#shili").show();
					$("#user_name").val(localStorage.login_name);

				//添加验证规则
				form.verify({
					photoCover: function(value) {
						if(value == "") {
							return "请选择广告图片";
						}
					},
					shop_img_url:function(value){
						if(value == "") {
							return "请选择广告图片";
						}
					}
				});
				
				form.on("submit(check)",function(data){
		        	//弹出loading
		        	//alert($("#file").val());
			        var index = top.layer.msg('数据提交中，请稍候',{icon: 16,time:false,shade:0.8});
			        var action 	= data.form.action;//表单提交URL地址
			        //var da		= data.field;
			        console.log(data.field);
			        $.post(action,data.field,function(obj){
			        	
			        });
			        // 实际使用时的提交信息
			        /*$.post(action,{
			         	"shop_name"			: $(".shop_name").val,
			         	"shop_wangwang"		: $(".shop_wangwang").val,
			         	"shop_type"			: $(".shop_type").val,
			         	"user_name"			: localStorage.login_name,
			         	"shop_img_url"		: img_url
			        },function(res){
			        	
			        })*/
			        setTimeout(function(){
			            top.layer.close(index);
			            top.layer.msg("商铺添加成功！");
			            layer.closeAll("iframe");
			            //刷新父页面
			            parent.location.reload();
			        },2000);
			        return false;
			    })
			})
			
			
		</script>
	</body>

</html>